<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * Work with queues.
<span class='line'>  3</span>  *
<span class='line'>  4</span>  * Queues store and forward messages.  Queues can be configured in the server
<span class='line'>  5</span>  *   or created at runtime.  Queues must be attached to at least one exchange
<span class='line'>  6</span>  *   in order to receive messages from publishers.
<span class='line'>  7</span>  *
<span class='line'>  8</span>  * @name Queue
<span class='line'>  9</span>  * @exports Queue as api.Queue
<span class='line'> 10</span>  * @class
<span class='line'> 11</span>  */</span><span class="WHIT">
<span class='line'> 12</span> 
<span class='line'> 13</span> 
<span class='line'> 14</span> </span><span class="COMM">/**
<span class='line'> 15</span>  * Confirms a queue definition.
<span class='line'> 16</span>  *
<span class='line'> 17</span>  * This method confirms a Declare method and confirms the name of the
<span class='line'> 18</span>  *     queue, essential for automatically-named queues.
<span class='line'> 19</span>  *
<span class='line'> 20</span>  * @name Queue#declareOk
<span class='line'> 21</span>  * @event
<span class='line'> 22</span>  * @param {String} queue The queue name identifies the queue within the vhost.  Queue
<span class='line'> 23</span>  *     names may consist of any mixture of digits, letters, and
<span class='line'> 24</span>  *     underscores.
<span class='line'> 25</span>  * @param {Number} messageCount Reports the number of messages in the queue, which will be zero
<span class='line'> 26</span>  *       for newly-created queues.
<span class='line'> 27</span>  * @param {Number} consumerCount Reports the number of active consumers for the queue. Note that
<span class='line'> 28</span>  *       consumers can suspend activity (Channel.Flow) in which case they
<span class='line'> 29</span>  *       do not appear in this count.
<span class='line'> 30</span>  */</span><span class="WHIT">
<span class='line'> 31</span> 
<span class='line'> 32</span> </span><span class="COMM">/**
<span class='line'> 33</span>  * Confirm bind successful.
<span class='line'> 34</span>  *
<span class='line'> 35</span>  * This method confirms that the bind was successful.
<span class='line'> 36</span>  *
<span class='line'> 37</span>  * @name Queue#bindOk
<span class='line'> 38</span>  * @event
<span class='line'> 39</span>  * 
<span class='line'> 40</span>  */</span><span class="WHIT">
<span class='line'> 41</span> 
<span class='line'> 42</span> </span><span class="COMM">/**
<span class='line'> 43</span>  * Confirms a queue purge.
<span class='line'> 44</span>  *
<span class='line'> 45</span>  * This method confirms the purge of a queue.
<span class='line'> 46</span>  *
<span class='line'> 47</span>  * @name Queue#purgeOk
<span class='line'> 48</span>  * @event
<span class='line'> 49</span>  * @param {Number} messageCount Reports the number of messages purged.
<span class='line'> 50</span>  */</span><span class="WHIT">
<span class='line'> 51</span> 
<span class='line'> 52</span> </span><span class="COMM">/**
<span class='line'> 53</span>  * Confirm deletion of a queue.
<span class='line'> 54</span>  *
<span class='line'> 55</span>  * This method confirms the deletion of a queue.
<span class='line'> 56</span>  *
<span class='line'> 57</span>  * @name Queue#deleteOk
<span class='line'> 58</span>  * @event
<span class='line'> 59</span>  * @param {Number} messageCount Reports the number of messages purged.
<span class='line'> 60</span>  */</span><span class="WHIT">
<span class='line'> 61</span> 
<span class='line'> 62</span> 
<span class='line'> 63</span> 
<span class='line'> 64</span> </span><span class="COMM">/**
<span class='line'> 65</span>  * Declare queue, create if needed.
<span class='line'> 66</span>  *
<span class='line'> 67</span>  * This method creates or checks a queue.  When creating a new queue
<span class='line'> 68</span>  *     the client can specify various properties that control the durability
<span class='line'> 69</span>  *     of the queue and its contents, and the level of sharing for the queue.
<span class='line'> 70</span>  *
<span class='line'> 71</span>  * @name Queue#declare
<span class='line'> 72</span>  * @function
<span class='line'> 73</span>  * @param {Number} ticket An access ticket granted by the server for a certain set of access
<span class='line'> 74</span>  *     rights within a specific realm. Access tickets are valid within the
<span class='line'> 75</span>  *     channel where they were created, and expire when the channel closes.
<span class='line'> 76</span>  * @param {String} queue The queue name identifies the queue within the vhost.  Queue
<span class='line'> 77</span>  *     names may consist of any mixture of digits, letters, and
<span class='line'> 78</span>  *     underscores.
<span class='line'> 79</span>  * @param {Boolean} passive If set, the server will not create the queue.  The client can use
<span class='line'> 80</span>  *     this to check whether a queue exists without modifying the server
<span class='line'> 81</span>  *     state.
<span class='line'> 82</span>  * @param {Boolean} durable If set when creating a new queue, the queue will be marked as
<span class='line'> 83</span>  *       durable.  Durable queues remain active when a server restarts.
<span class='line'> 84</span>  *       Non-durable queues (transient queues) are purged if/when a
<span class='line'> 85</span>  *       server restarts.  Note that durable queues do not necessarily
<span class='line'> 86</span>  *       hold persistent messages, although it does not make sense to
<span class='line'> 87</span>  *       send persistent messages to a transient queue.
<span class='line'> 88</span>  * @param {Boolean} exclusive Exclusive queues may only be consumed from by the current connection.
<span class='line'> 89</span>  *       Setting the 'exclusive' flag always implies 'auto-delete'.
<span class='line'> 90</span>  * @param {Boolean} autoDelete If set, the queue is deleted when all consumers have finished
<span class='line'> 91</span>  *       using it. Last consumer can be cancelled either explicitly or because
<span class='line'> 92</span>  *       its channel is closed. If there was no consumer ever on the queue, it
<span class='line'> 93</span>  *       won't be deleted.
<span class='line'> 94</span>  * @param {Boolean} nowait If set, the server will not respond to the method. The client should
<span class='line'> 95</span>  *     not wait for a reply method.  If the server could not complete the
<span class='line'> 96</span>  *     method it will raise a channel or connection exception.
<span class='line'> 97</span>  * @param {Object} arguments A set of arguments for the declaration. The syntax and semantics
<span class='line'> 98</span>  *       of these arguments depends on the server implementation.  This
<span class='line'> 99</span>  *       field is ignored if passive is 1.
<span class='line'>100</span>  */</span><span class="WHIT">
<span class='line'>101</span> 
<span class='line'>102</span> </span><span class="COMM">/**
<span class='line'>103</span>  * Bind queue to an exchange.
<span class='line'>104</span>  *
<span class='line'>105</span>  * This method binds a queue to an exchange.  Until a queue is
<span class='line'>106</span>  *     bound it will not receive any messages.  In a classic messaging
<span class='line'>107</span>  *     model, store-and-forward queues are bound to a dest exchange
<span class='line'>108</span>  *     and subscription queues are bound to a dest_wild exchange.
<span class='line'>109</span>  *
<span class='line'>110</span>  * @name Queue#bind
<span class='line'>111</span>  * @function
<span class='line'>112</span>  * @param {Number} ticket An access ticket granted by the server for a certain set of access
<span class='line'>113</span>  *     rights within a specific realm. Access tickets are valid within the
<span class='line'>114</span>  *     channel where they were created, and expire when the channel closes.
<span class='line'>115</span>  * @param {String} queue The queue name identifies the queue within the vhost.  Queue
<span class='line'>116</span>  *     names may consist of any mixture of digits, letters, and
<span class='line'>117</span>  *     underscores.
<span class='line'>118</span>  * @param {String} exchange The exchange name is a client-selected string that identifies
<span class='line'>119</span>  *       the exchange for publish methods.  Exchange names may consist
<span class='line'>120</span>  *       of any mixture of digits, letters, and underscores.  Exchange
<span class='line'>121</span>  *       names are scoped by the virtual host.
<span class='line'>122</span>  * @param {String} routingKey Specifies the routing key for the binding.  The routing key is
<span class='line'>123</span>  *       used for routing messages depending on the exchange configuration.
<span class='line'>124</span>  *       Not all exchanges use a routing key - refer to the specific
<span class='line'>125</span>  *       exchange documentation.  If the routing key is empty and the queue
<span class='line'>126</span>  *       name is empty, the routing key will be the current queue for the
<span class='line'>127</span>  *       channel, which is the last declared queue.
<span class='line'>128</span>  * @param {Boolean} nowait If set, the server will not respond to the method. The client should
<span class='line'>129</span>  *     not wait for a reply method.  If the server could not complete the
<span class='line'>130</span>  *     method it will raise a channel or connection exception.
<span class='line'>131</span>  * @param {Object} arguments A set of arguments for the binding.  The syntax and semantics of
<span class='line'>132</span>  *       these arguments depends on the exchange class.
<span class='line'>133</span>  */</span><span class="WHIT">
<span class='line'>134</span> 
<span class='line'>135</span> </span><span class="COMM">/**
<span class='line'>136</span>  * Purge a queue.
<span class='line'>137</span>  *
<span class='line'>138</span>  * This method removes all messages from a queue.  It does not cancel
<span class='line'>139</span>  *     consumers.  Purged messages are deleted without any formal "undo"
<span class='line'>140</span>  *     mechanism.
<span class='line'>141</span>  *
<span class='line'>142</span>  * @name Queue#purge
<span class='line'>143</span>  * @function
<span class='line'>144</span>  * @param {Number} ticket An access ticket granted by the server for a certain set of access
<span class='line'>145</span>  *     rights within a specific realm. Access tickets are valid within the
<span class='line'>146</span>  *     channel where they were created, and expire when the channel closes.
<span class='line'>147</span>  * @param {String} queue The queue name identifies the queue within the vhost.  Queue
<span class='line'>148</span>  *     names may consist of any mixture of digits, letters, and
<span class='line'>149</span>  *     underscores.
<span class='line'>150</span>  * @param {Boolean} nowait If set, the server will not respond to the method. The client should
<span class='line'>151</span>  *     not wait for a reply method.  If the server could not complete the
<span class='line'>152</span>  *     method it will raise a channel or connection exception.
<span class='line'>153</span>  */</span><span class="WHIT">
<span class='line'>154</span> 
<span class='line'>155</span> </span><span class="COMM">/**
<span class='line'>156</span>  * Delete a queue.
<span class='line'>157</span>  *
<span class='line'>158</span>  * This method deletes a queue.  When a queue is deleted any pending
<span class='line'>159</span>  *     messages are sent to a dead-letter queue if this is defined in the
<span class='line'>160</span>  *     server configuration, and all consumers on the queue are cancelled.
<span class='line'>161</span>  *
<span class='line'>162</span>  * @name Queue#delete
<span class='line'>163</span>  * @function
<span class='line'>164</span>  * @param {Number} ticket An access ticket granted by the server for a certain set of access
<span class='line'>165</span>  *     rights within a specific realm. Access tickets are valid within the
<span class='line'>166</span>  *     channel where they were created, and expire when the channel closes.
<span class='line'>167</span>  * @param {String} queue The queue name identifies the queue within the vhost.  Queue
<span class='line'>168</span>  *     names may consist of any mixture of digits, letters, and
<span class='line'>169</span>  *     underscores.
<span class='line'>170</span>  * @param {Boolean} ifUnused If set, the server will only delete the queue if it has no
<span class='line'>171</span>  *       consumers. If the queue has consumers the server does does not
<span class='line'>172</span>  *       delete it but raises a channel exception instead.
<span class='line'>173</span>  * @param {Boolean} ifEmpty If set, the server will only delete the queue if it has no
<span class='line'>174</span>  *       messages. If the queue is not empty the server raises a channel
<span class='line'>175</span>  *       exception.
<span class='line'>176</span>  * @param {Boolean} nowait If set, the server will not respond to the method. The client should
<span class='line'>177</span>  *     not wait for a reply method.  If the server could not complete the
<span class='line'>178</span>  *     method it will raise a channel or connection exception.
<span class='line'>179</span>  */</span><span class="WHIT">
<span class='line'>180</span> 
<span class='line'>181</span> </span></pre></body></html>